package cn.codeartist.wechat.qywx.config;

import cn.codeartist.wechat.qywx.entity.vo.R;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 全局异常拦截
 *
 * @author 艾江南
 * @date 2020/7/28
 */
@ControllerAdvice
@ResponseBody
public class ControllerExceptionHandler {

    @ExceptionHandler(Exception.class)
    public R<?> exception() {
        return R.error();
    }
}
